<?php
//权限判断
require_once('check.php');
require_once('../system/conndb.php');
//可以加上 $_POST['']的判断

$sql = "update users set state="
		.$_GET['state'].
		" where uid=".$_GET['uid'];

//echo $sql;
//exit;
$link = connect();
$result = mysqli_query($link,$sql);
//var_dump($result);exit;
//$num= mysqli_affected_rows($result);
if($result){
	echo "操作成功！2秒后自动跳转！";
	 header("Refresh:2;url=userlist.php");
}
else
{
   echo "操作异常！";
   echo '<a href="javascript:history.go(-1);">返回上一页</a>';	
}

?>